/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package py.com.peluq.model.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author Diego_M
 */
@Embeddable
public class CobDetallePK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "Nro_fac", nullable = false)
    private int nrofac;
    @Basic(optional = false)
    @NotNull
    @Column(name = "cuo_nro", nullable = false)
    private int cuoNro;
    @Basic(optional = false)
    @NotNull
    @Column(name = "cob_cod", nullable = false)
    private int cobCod;

    public CobDetallePK() {
    }

    public CobDetallePK(int nrofac, int cuoNro, int cobCod) {
        this.nrofac = nrofac;
        this.cuoNro = cuoNro;
        this.cobCod = cobCod;
    }

    public int getNrofac() {
        return nrofac;
    }

    public void setNrofac(int nrofac) {
        this.nrofac = nrofac;
    }

    public int getCuoNro() {
        return cuoNro;
    }

    public void setCuoNro(int cuoNro) {
        this.cuoNro = cuoNro;
    }

    public int getCobCod() {
        return cobCod;
    }

    public void setCobCod(int cobCod) {
        this.cobCod = cobCod;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) nrofac;
        hash += (int) cuoNro;
        hash += (int) cobCod;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof CobDetallePK)) {
            return false;
        }
        CobDetallePK other = (CobDetallePK) object;
        if (this.nrofac != other.nrofac) {
            return false;
        }
        if (this.cuoNro != other.cuoNro) {
            return false;
        }
        if (this.cobCod != other.cobCod) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "py.com.peluq.model.entity.CobDetallePK[ nrofac=" + nrofac + ", cuoNro=" + cuoNro + ", cobCod=" + cobCod + " ]";
    }
    
}
